package org.example.demo21.strategy.impl;

import org.example.demo21.entity.bo.DemoBO;
import org.example.demo21.strategy.AgeStrategy;
import org.springframework.stereotype.Component;

import java.util.Random;

/**
 *
 * @author guocong
 * @since 2024/3/29 15:25
 */
@Component("ygd")
public class YgdAgeStrategy implements AgeStrategy {

    @Override
    public void ageProcess(DemoBO demoBO) {
        Random random = new Random();
        int a = random.nextInt(40) + 60;
        demoBO.setAge(a).setAgeType("60岁以上，已加入秧歌队！");
    }


}
